Skip to content

Start MCP Instrumentation Library #3678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

liustve
Copy link

@liustve liustve commented Aug 5, 2025

Description

This PR begins the basic structure of adding instrumentation to the mcp following the same structure as:

AWS Distro for OpenTelemetry (ADOT) is in process of developing an mcp instrumentation library package and would like to contribute the work. It is currently limited to traces only and doesn't include metrics and log events.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated


[project.optional-dependencies]
instruments = [
"mcp >= 0.1.6",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not make this mistake again, please. Can you bump this version to a relatively new one?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. Done!

Copy link
Contributor

@Kludex Kludex Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to apologize, I meant because of Starlette and httpx.

pyproject.toml Outdated
Comment on lines 219 to 220
"instrumentation-genai/opentelemetry-instrumentation-mcp/tests/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-mcp/examples/**/*.py",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm disappointed this exclude section grew so much and by new projects... It was not supposed to be used by new projects.

I don't think it makes sense to add those 2. Supporting proper type hints from the beginning is easier.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants